<template>
	<view class="container">
		<view class="up">
			<view class="title">温馨提示</view>
			<view class="content">
				<parser class="parser" :html="content" ref="article" :tag-style="tagStyle"></parser>
			</view>
			<view class="confirm">
				<image class="check" src="../../static/images/check_normal.png"></image>
				<view class="text">我已阅读同意<view class="link" @click="platEvent()">《平台免责声明》</view></view>
			</view>
		</view>
		<view class="down">
			<view class="price-info">支付金额：<view class="price">{{amount}}</view><view class="unit">元</view></view>
			<view class="bottom">
				<view class="submit">立即支付</view>
			</view>
		</view>
	</view>
</template>

<script>
	import parser from "@/components/jyf-parser/jyf-parser";
	// #ifdef MP
	import authorize from "@/components/Authorize";
	// #endif
	import {get_platform_setting} from "@/api/platform.js";
	export default {
		components: {
			parser,
			// #ifdef MP
			authorize,
			// #endif
		},
		data() {
			return {
				content:'',
				amount:0.00
			}
		},
		onLoad(options) {
			this.getData();
		},
		methods: {
			platEvent(){
				
			},
			getData(){
				let that = this;
				uni.showLoading({
					title:'加载中...'
				});
				get_platform_setting(this.id).then((res) => {
					uni.hideLoading();
					let data = res.data;
					that.data = data;
					that.amount = data.amount;
					that.content = data.tips;
				});
			}
		}
	}
</script>

<style lang="scss">
	.container{
		.up{
			display: flex;
			flex-direction: column;
			background-color: white;
			padding: 30rpx;
			margin: 10rpx;
			.title{
				font-size: 28rpx;
				font-weight: bold;
			}
			.content{
				display: flex;
				flex-direction: row;
				margin-top: 20rpx;
				.parser{
					
				}
			}
			.confirm{
				margin-top: 50rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				.check{
					width:50rpx;
					height:50rpx;
				}
				.text{
					margin-left: 15rpx;
					font-size: 28rpx;
					color: gray;
					display: flex;
					flex-direction: row;
					align-items: center;
					.link{
						color: darkorange;
						font-size: 28rpx;
					}
				}
			}
		}
		.down{
			background-color: white;
			padding: 30rpx;
			margin: 10rpx;
			margin-top: 10rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			padding-bottom: 50rpx;
			.price-info{
				display: flex;
				flex-direction: row;
				align-items: center;
				color: black;
				font-size: 28rpx;
				.price{
					font-size: 36rpx;
					font-weight: bold;
					color: red;
				}
				.unit{
					font-size: 28rpx;
					color: red;
					margin-left: 10rpx;
				}
			}
			.bottom{
				display: flex;
				flex-direction: row;
				justify-content: center;
				margin-top: 80rpx;
				.submit{
					height: 80rpx;
					width: 75%;
					background-color: #2BA5FF;
					line-height: 80rpx;
					border-radius: 40rpx;
					text-align: center;
					color: white; 
				}
			}
		}
	}
</style>
